import { IPropsChild } from "@/utils/types";
import { connect, useGetUser } from "@/hooks/userHooks";
import { Spin } from "antd";

/**
 *用户信息
 */
const UserInfo = ({ children }: IPropsChild) => {
  const { loading } = useGetUser();
  return (
    <Spin spinning={loading}>
      <div>{children}</div>
    </Spin>
  );
};

export default connect(UserInfo);
